

class GoodItemModel {
  String goodsId; // 
  String code; // 
  String icon; // 
  String tags; //
  String type; //
  String invitationId; //
  int  extraCoinPercent;//自带送比例
  int  thirdpartyCoinPercent;//第三方比例
  double price;
  double discount;
  int exchangeCoin;
  bool isPromotion;//是否促销


  GoodItemModel(
      {required this.goodsId,
      required this.code,
      required this.icon,
      required this.tags,
      required this.type,
      required this.invitationId,
      required this.extraCoinPercent,
      required this.thirdpartyCoinPercent,
      required this.discount,
      required this.price,
      required this.isPromotion,
      required this.exchangeCoin,


      });

  factory GoodItemModel.coverFromJson(dynamic data) => GoodItemModel(
      goodsId: data['goodsId']??'',
      code: data['code']??"",
      icon: data['icon']??"",
      tags: data['tags']??"",
      type: data['type']??"",
      invitationId: data['invitationId']??"",
      extraCoinPercent: data['extraCoinPercent']??0,
      thirdpartyCoinPercent: data['thirdpartyCoinPercent']??0,
      price: data['price']??0.0,
      discount: data['discount']??0,
      exchangeCoin: data['exchangeCoin']??0.0,
      isPromotion: data['isPromotion'],
     
      );
}
